<?php
/**
 * Created by PhpStorm.
 * User: Jmashimaro
 * Date: 2015/4/23
 * Time: 15:34
 */
class HelpApp extends MallbaseApp {

    /**
     * 关于我们
     * @author jiayanxiu
     * @date 2014/04/23
     */
    public function about_us() {
        $method = strtoupper($_SERVER['REQUEST_METHOD']);
        if ($method !== 'GET') {
            $this->ajax_return(FLAG_ERROR, '非法请求！');
        }
        $article_id = 26;
        $mod_article = m('article');
        $sql = "SELECT article_id,title,content,add_time FROM ".DB_PREFIX."article WHERE article_id={$article_id}";
        $data = $mod_article->getRow($sql);
        $this->ajax_return(FLAG_OK, '', $data);
    }

    /**
     * 联系我们
     * @author jiayanxiu
     * @date 2014/04/23
     */
    public function connect_us() {
        $method = strtoupper($_SERVER['REQUEST_METHOD']);
        if ($method !== 'GET') {
            $this->ajax_return(FLAG_ERROR, '非法请求！');
        }
        $article_id = 25;
        $mod_article = m('article');
        $sql = "SELECT article_id,title,content,add_time FROM ".DB_PREFIX."article WHERE article_id={$article_id}";
        $data = $mod_article->getRow($sql);
        $this->ajax_return(FLAG_OK, '', $data);
    }


}